home *** CD-ROM | disk | FTP | other *** search
- bbs> Msg# 113921 To: ATARI @EU From: ON4ASX Date: 01Mar91/0459
- Subject: YAGI BAS prg 1/5
- Bulletin ID: 4687_ON4ASX
- Path: DB0CZ!OE9XPI!HB9EAS!DB0GE!LX0PAC!ONN7RC!ON4HU!ON4ASX
- From: ON4ASX@ON4ASX.BVWV.BEL.EU
- To : ATARI@EU
- part 1/5
-
- LIBRARY "BIOS"
-
- maxels=100
- dim s(maxels), d(maxels), dh(maxels), dl(maxels),t(maxels)
-
- ' ********* TITLE *********
- BEGIN:
- cls
- call revideo(1)
- call printat(1,23," DL6WU YAGI ANTENNA DESIGN ",0)
- call revideo(0)
- call printat(2,24,"Original by KY4Z and W6NBI",0)
- call printat(3,25,"Ported to the ST by G6ATW",0)
- ' ********* CALL SIGN **********
- MYCALL:
- call printat(8,24,"Please Enter Your Call Sign",0)
- locate 12,34,1
- input "",sign$ : sign$=ucase$(sign$)
- if len(sign$) > 10 then goto MYCALL
- ' ********* FREQUENCY **********
- call clearit
- call printat(8,24,"Enter Design Frequency [MHz]",0)
- locate 12,34,1
- input "",freq$
- f=val(freq$)
- cm=29979.3/f : inch=11802.9/f
- ' ********* DIMENSIONS **********
- call clearit
- call printat(8,20,"Physical Dimensions Can Be Entered In",0)
- call printat(10,29,"[ 1 ] Feet",0)
- call printat(11,29,"[ 2 ] Metres",0)
- call printat(12,29,"[ 3 ] Wavelengths",0)
- call printat(14,29,"Select 1, 2 or 3",0)
- do
- p$=inkey$
- select case p$
- case = "1"
- u$="Feet" : exit loop
- case = "2"
- u$="Metres" : exit loop
- case = "3"
- u$="Wavelengths" : exit loop
- end select
- loop
-
- ' ********** GAIN or BOOM LENGTH ***********
- L320:
- call clearit
- call printat(8,32,"You Can Either",0)
- call printat(10,20,"[ 1 ] Specify forward gain in dBd and",0)
- call printat(11,20," accept estimated boom length, or",0)
- call printat(12,20,"[ 2 ] Specify boom length and accept",0)
- call printat(13,20," estimated gain",0)
- call printat(15,32,"Select 1 or 2",0)
- do
- kb$=inkey$
- loop until kb$="1" or kb$="2"
-
- if kb$="2" goto L530
-
- ' ********** GAIN *********
- L390:
- g=0 : prat = 0
- while (g<11.8 or g>21.6)
- prat=prat+1
- if prat > 3 then
- call dickhead
- end if
- call clearit
- call printat(8,24,"Forward Gain Must Be Between",0)
- call printat(9,24," 11.8 dBd and 21.6 dBd",0)
- call printat(11,24," Enter Required Gain [dBd]",0)
- locate 13,36,1
- input "",gain$
- g=val(gain$)
- wend
-
- bl = exp((g-9.2)/3.39)
- b1 = bl * inch/12
- b2 = bl * cm/100
-
- call clearit
- call printat(8,24,"Estimated Overall Boom Length",0)
- locate 10,34,0
- print using "###.##";b1; : print " Feet";
- call printat(12,20,"[ ",0)
- print using "###.##"; b2; : print " Metres";
- print using "###.##"; bl; : print " Wavelengths ]";
- call printat(15,24,"Is This Boom Length Ok ? Y/N",0)
- do
- kb$=ucase$(inkey$)
- loop until kb$="Y" or kb$="N"
- if kb$="Y" then
- goto L660
- else
- goto L320
- end if
-
- L530:
- ' ********* BOOM LENGTH **********
- bl = 0 : prat = 0
- while (bl<2.2 or bl>39)
- prat = prat+1
- if prat>3 then call dickhead
- call clearit
- call printat(8,20,"Overall Boom Length Must Be Between",0)
- call printat(9,28,"2.2 and 39 Wavelengths",0)
- b1 = 2.2 * cm/100 : b2 = 39 * cm/100
- b3 = 2.2 * inch/12 : b4= 39 * inch/12
- call printat(11,25,"[ ",0)
- print using "###.##"; b1; : print " to ";
- print using "###.##"; b2; : print " Metres ]";
- call printat(12,25,"[ ",0)
- print using "###.##"; b3; : print " to ";
- print using "###.##"; b4; : print " Feet ]";
- call printat(114,25,"Enter Boom Length in ",0) : print u$;
- locate 16,36,1
- input "",boom$
- bl=val(boom$)
- if p$="1" then bl = bl * 12 / inch
- if p$="2" then bl = bl * 100 / cm
- wend
-
- end 1/5
-
-
-
- bbs> Msg# 113922 To: ATARI @EU From: ON4ASX Date: 01Mar91/0504
- Subject: YAGI BAS 2/5
- Bulletin ID: 4688_ON4ASX
- Path: DB0CZ!OE9XPI!HB9EAS!DB0GE!LX0PAC!ON7RC!ON4HU!ON4ASX
- From: ON4ASX@ON4ASX.BVWV.BEL.EU
- To : ATARI@EU
-
- 2/5
-
- g = 9.2 + 3.39 * log(bl)
-
- call printat(18,20,"Estimated Maximum Gain is",0)
- print using "###.##";g; : print " dBd";
- call printat(20,26,"Is This Gain Ok ? Y/N",0)
- do
- kb$=ucase$(inkey$)
- loop until kb$="Y" or kb$="N"
- if kb$="N" then goto L320
-
- ' ********* BOOM MATERIAL AND ELEMENT MOUNTING ************
- L660:
- call clearit
- call printat(8,18,"Select Boom Material and Element Mounting",0)
- call printat(10,18,"[ 1 ] Metal boom, elements pass through",0)
- call printat(11,18," and are NOT INSULATED",0)
- call printat(12,18,"[ 2 ] Metal boom, elements pass through",0)
- call printat(13,18," but are INSULATED",0)
- cal printat(14,18,"[ 3 ] Non-metallic boom, or elements are",0)
- call printat(15,18," mounted on insulators",0)
- call printat(17,18,"WARNING: option 3 implies NO CORRECTION",0)
- call printat(18,18," for influence of metal boom !",0)
- call printat(19,18," If in doubt, choose 1 or 2",0)
- call printat(21,27,"Select 1, 2 or 3",0)
- do
- e$=inkey$
- loop until e$="1" or e$="2" or e$="3"
- if e$="3" then
- bc1 = 0 : bd = 0 : goto L1070
- ennd if
-
- L780:
- bd = -1
- while (bd < 0 or bd > 0.06)
- call clearit
- call printat(8,24,"Enter Boom Diameter or Width",0)
- call printat(9,24,"of Square Section in ",0)
- if p$"1" then print "Inches";
- if p$="2" then print "Centimetres";
- d1 = 0.06 * cm : d2 = 0.06 * inch
- call printat(11,18,"[ Maximum ",0)
- print using "##.##"; d1; : print " Centimetres";
- print using "##.##"; d2; : print " Inches ]";
- locate 13,36,1 : input "",boomd$
- bd=val(boomd$)
- if p$="1" then bd = bd / inch
- if p$="2" thhen bd = bd / cm
- wend
-
- bc1 = 733 * bd * (0.055 - bd) - 504 * bd * (0.03 - bd)
- call clearit
- call printat(8,18,"Your choice of boom material and element",0)
- call printat(9,18,"mounting method requires a correction to",0)
- call printat(10,18,"all the element lengths. If the elemments",0)
- call printat(11,18,"pass diametrically through the boom, and",0)
- call printat(12,18,"are bonded to it, the boom correction",0)
- call printat(13,18,"would be ",0)
- print using "#.####";bc1; : print " of the boom diameter.";
- if e$="1" then
- goto L950
- else
- bc1 = bc1 / 2
- end if
- call printat(14,18,"Since you have chosen insulated elements",0)
- call printat(15,18,"the boom correction is one-half that, ie",0)
- locate 16,18,0 : print using "#.####"; bc1;
- print " of the boom diameter.";
- L950:
- call printat(18,20,"Is This Boom Correction Ok ? Y/N",0)
- do
- kb$=ucase$(inkey$)
- loop until kb$="Y" or kb$="N"
- if kb$="Y" then goto L1070
-
- call clearit
- call printat(8,20," Hmmm .... in that case you can",0)
- call printat(10,20,"[ 1 ] Enter your own boom correction",0)
- call printat(11,20,"[ 2 ] Select a different element",0)
- call printat(12,20," mounting method",0)
- call printat(13,20,"[ 3 ] Accept my boom correction",0)
- call printat(14,20," after all",0)
- call printat(15,20," Select 1, 2 or 3",0)
- do
- kb$=ucase$(inkey$)
- loop until kb$="1" or kb$="2" or kb$="3"
- if kb$="2" then goto L660
- if kb$="3" then goto L1070
-
- end 2/5
-
-
-
- bbs> Msg# 113924 To: ATARI @EU From: ON4ASX Date: 01Mar91/0508
- Subject: YAGI BAS 3/5
- Bulletin ID: 4689_ON4ASX
- Path: DB0CZ!OE9XPI!HB9EAS!DB0GE!LX0PAC!ON7RC!ON4HU!ON4ASX
- From: ON4ASX@ON4ASX.BVWV.BEL.EU
- To : ATARI@EU
-
- 3/5
-
- bc1= -1
- while (bc1<0 or bc1>1)
- call clearit
- call printat(8,20,"Enter your correction as a fraction",0)
- call printat(9,20,"of boom diameter between 0 and 1",0)
- locate 11,36,1 : input "", bcor$
- bc1 = val(bcor$)
- wend
-
- bc = bc1 * bd
-
- ' ********* ELEMENT DIAMETERS *************
- L1070:
- dd = -1 : ed = -1
- while (dd < 0.001 or dd > 0.02 or ed < 0.001 or ed > 0.02)
- call clearit
- call printat(8,22,"Element Diameter Must Be Between",0)
- call printat(9,22," 0.001 and 0.02 Wavelengths",0)
- d1 = 0.001 * cm : d2 = 0.02 * cm
- d3 = 0.001 * inch : d4 = 0.02 * inch
- call printat(11,23,"[ ",0)
- print using "##.##"; d1; : print " to ";
- print using "##.##"; d2; : print " Centimetres ]";
- call printat(12,23,"[ ",0)
- print using "##.##"; d3; : print " to ";
- print using "##.##"; d4; : print " Inches ]";
- call printat(14,24,"Enter Driven Element Diameter",0)
- locate 15,32,0 : print "in ";
- if p$="1" then
- print "Inches";
- else
- print "Centimetres";
- end if
- locate 17,35,1 : input "",dd$$
- dd=val(dd$)
- call printat(19,22,"Enter Parasitic Elemeent Diameter",0)
- locate 20,32,0 : print "in ";
- if p$="1" then
- print "Inches";
- else
- print "Centimetres";
- end if
- locate 22,35,1 : input "",ed$
- ed=val(ed$)
- if p$="1" then
- dd = dd / inch
- ed = ed / inch
- end if
- if p$="2" then
- dd = dd / cm
- ed = ed / cm
- end if
- wend
-
- ' ********** MATHS ***********
- L1180:
- m=0 : sy=1
- sr=0.216144
- L1200:
- la=bl-sr
- for n=1 to 14
- s(n)=0.081444+0.12178*log(n)
- if n=1 then
- t(n)=sr+s(n)
- else
- t(n)=t(n-1)+s(n)
- end if
- la=la-s(n)
- if la < 0 then
- m=n-1 : n=14 : sy=la : la=la+s(n)
- end if
- next n
- if sy < 0 then goto L1330:
- for n=15 to maxels
- s(n)=s(14)
- t(n)=t(n-1)+s(n)
- la=la-s(n)
- if la < 0 then
- m=n-1 : la=la+s(n) : n=maxels
- end if
- next n
- L1330:
- ll=bl-la
- g1=9.2+3.39*log(ll)
- if g1<11.8 then
- bl=1.05*bl
- lse
- goto L1380
- end if
- goto L1200
- L1380:
- restore
- for q=1 to 7
- read k,k1,k2,k3,k4
- if k = ed then
- j=0 : goto L1480
- end if
- if k < ed then
- l=k
- else
- goto L1430
- end if
- kl1=k1 : kl2=k2 : kl3=k3 : kl4=k4
- L1430:
- if k > ed then
- h=k
- else
- goto L1460
- end if
- kh1=k1 : kh2=k2 : kh3=k3 : kh4=k4
- goto L1470
- L1460:
- next q
- L1470:
- j=(ed-l)/(h-l)
- L1480:
- r=0.476945+bc
- de=(0.4777-(1.0522*dd)+(0.43363*(dd^-0.014891)))/2
- for n=1 to m
- if j=0 then
- d(n)=(k1-k2*log(n))*(1-k3*exp(-k4*n))
- else
- gosub L2040
- end if
- d(n)=d(n)+bc
- next n
-
- ' ********* SCREEN DISPLAY ***********
- L2500:
- cls
- if len(sign$) then
- call printat(1,20," DL6WU YAGI DESIGN FOR ",0)
- print sign$;
- else
- call printat(1,20,"---- DL6WU YAGI DESIGN DETAILS ----",0)
- end if
- call printat(33,20,"Design Frequency : ",0) : print freq$;" MHz";
- call printat(4,20,"Number of Elements : ",0) : print m+2;
- call printat(5,20,"Boom Diameter : ",0)
- xx=FNunits(bd)
- print using "###.###";xx; : printunits
-
- end 3/5
-
-
-
- Msg# 113934 To: ATARI @EU From: ON4ASX Date: 01Mar91/0641
- Subject: YAGI BAS 4/5
- Bulletin ID: 4690_ON4ASX
- Path: DB0CZ!DB0FRB!DB0GE!LX0PAC!ON7RC!ON4HU!ON4ASX
- From: ON4ASX@ON4ASX.BVWV.BEL.EU
- To : ATARI@EU
-
- 4/5
-
- call printat(6,20,"Element Diameters",0)
- call printat(7,20," Driven : ",0)
- xx=FNunits(dd)
- print using "###.###";xx; : printunits
-
- call printat(8,20," Parasitic : ",0)
- xx=FNunits(ed)
- print using "###.###";xx; : printunits
-
- call printat(9,20,"Electrical Boom Length: ",0)
- xx=FNunits(ll)
- print using "###.###";xx; : printunits
-
- call printat(10,20,"Estimated Performance",0)
- call printat(11,20," Gain : ",0)
- print using "###.###";g1; : print " dBd";
- bh=30-3.14*(g1-14)
- call printat(12,20," E-Beamwidth : ",0)
- print using "###.###"; bh; : print " deg";
- bv=bh/cos(bh/(2*57))
- call printat(13,20," H-Beamwidth : ",0)
- print using "###.###"; bv; : print "" deg";
-
- call printat(14,20,"Stacking Distances",0)
- call printat(15,20," Horizontal : ",0)
- sh=51/bh : sv=51/bv
- xx=FNunits(sh)
- print using "###.###";xx; : printunits
- call printat(16,20," Vertical : ",0)
- xx=FNunits(sv)
- print using "###.###"; xx; : printunits
-
- locate 18,1,0
- print tab(10);"NOTES:"
- if len(bcor$) then
- print tab(10);"You have chosen your own element mounting method"
- print tab(10);"or boom correction"
- goto L2770
- end if
- select case e$
- case = "1"
- print tab(10);"Elements are SECURELY connected to the metal boom"
- case = "2"
- print tab(10);"Ele
- ments are INSULATED through the metal boom"
- case = "3"
- print tab(10);"Elements are INSULATED or the boom is NON-CONDUCTIVE"
- end select
- L2770:
- if e$<>"3" then
- print tab(10);"A boom correction of ";
- print using "#.####"; bc1;
- print " the boom diameter has been applied"
- end if
- print tab(10);"Tolerance required for element lengths is +/- ";
- xx=FNunits(0.003)
- print using "#.####"; xx; : printunits
-
- print : print : print tab(20);"Hard Copy of Detailed Antenna Design? Y/N"
- do
- kb$=ucase$(inkey$)
- loop until kb$="Y" or kb$="N"
- if kb$ = "Y" then goto HARDCOPY
-
- AGAIN:
- print : print tab(35);"Run Again? Y/N";
- do
- kb$=ucase$(inkey$)
- loop until kb$="Y" or kb$="N"
- if kb$ = "Y" then
- goto BEGIN
- else
- system
- end if
-
-
- ' ********** PRINTER OUTPUT ************
- HARDCOPY:
- if len(sign$) then
- lprint tab(10);"DL6WU YAGI DESIGN FOR ";sign$
-
- lprint tab(10);
- for i=1 to len(sign$)
- lprint "=";
- next i
- lprint "======================"
- else
- lprint tab(10);" DL6WU YAGI DESIGN DETAILS"
- lprint tab(10);"================================="
- end if
- lprint
- lprint tab(10);"Original program by KY4Z and W6NBI"
- lprint tab(10);"Ported t the Atari ST by G6ATW"
- lprint tab(10);" ST Version 1.0"
- lprint : lprint
- lprint tab(10);"Design Frequency : "; freq$;" MHz"
- lprint tab(10);"Number of Elements : "; m+2
- lprint tab(10);"Boom Diameter : ";
- xx=FNunits(bd)
- lprint using "###.###";xx; : lprintunits
-
- lprint tab(10);"Element Diameters";
- lprint tab(10)" Driven : ";
- xx=FNunits(dd)
- lprint using "###.###";xx; : lprintunits
-
- lprint tab(10);" Parasitic : ";
- xx=FNunits(ed)
- lprint using "###.###";xx; : lprintunits
-
- lprint tab(10);"Electrical Boom Length: ";
- xx=FNunits(ll)
- lprint using "###.###";xx; : lprintunits
- lprint
- lprint tab(10);"Estimated Performance"
- lprint tab(10);" Gain : ";
- lprint using "###.###";g1; : lprint " dBd"
- bh=30-3.14*(g1-14)
- lprint tab(10);" E-Beamwidth : ";
- lprint using "###.###"; bh; : lprint " deg"
- bv=bh/cos(bh/(2*57))
- lprint tab(10);" H-Beamwidth : ";
- lprint using "###.###"; bv; : lprint " deg"
- lprint
- end 4/5
-
-
-
- bbs> Msg# 113935 To: ATARI @EU From: ON4ASX Date: 01Mar91/0644
- Subject: YAGI BAS 5/5
- Bulletin ID: 4691_ON4ASX
- Path: DB0CZ!DB0FRB!DB0GE!LX0PAC!ON7RC!ON4HU!ON4ASX
- To : ATARI@EU
-
- 5/5lprnt tab(10);"Stacking Distances"
- lprint tab(10);" Horizontal : ";
- sh=51/bh : sv=51/bv
- xx=FNunits(sh)
- lprint uing "###.###";xx; : lprintunits
- lprint tab(10);" Vertical : ";
- xx=FNunits(sv)
- lprint using "###.###"; xx; : lprintunits
-
- lprint tab(10);"NOTES:"
- if len(bcor$) then
- lprint tab(10);"You have chosen your own element mounting method"
- lprint tab(10);"or boom correction"
- goto P2770
- end if
- select case e$
- case = "1"
- lprint tab(10);"Elements are SECURELY connected to the metal boom"
- case = "2"
- lprint tab(10);"Elements are INSULATED through the metal boom"
- case = "3"
- lprint tab(10);"Elements are INSULATED or the boom is NON-CONDUCTIVE"
- end select
- P2770:
- if e$<>"3" then
- lprint tab(10);"A boom correction of ";
- lprint using "#.####"; bc1;
- lprint " the boom diameter has been applied"
- end if
- lprint tab(10);"Tolerance required for element lengths is +/- ";
- xx=FNunits(0.003)
- lprint using "#.####"; xx; : lprintunits
-
- lprint chr$(12)
- lprint tab(6);"CUMULATIVE";tab(58);"ELEMENT"
- lprint tab(6);"SPACING";tab(58);"LENGTH"
- lprint tab(6);"----------";tab(58);"-------"
- lprint tab(4);"Cms";tab(15);"Inches";tab(56);"Cms";tab(64);"Inches"
- lprint
- lprint tab(4);"0";tab(15);"0";
- lprint tab(23);"REFL ----------#---------- ";
- xx=r*cm : lprint using "####.##";xx;
- lprint tab(63); : xx=r*inch : lprint using "####.##";xx
- lprint tab(38);"#"
- lprint tab(2); : xx=sr*cm :lprint using "####.##";xx;
- lprint tab(13); : xx=sr*inch : lprint using "####.##";xx;
- lprint tab(23);"DR EL =========#========= ";
- xx=de*cm : lprint using "####.##";xx;
- lprint tab(63); : xx=de*inch : lprint using "####.##";xx
- for n=1 to m
- lprint tab(38);"#"
- lprint tab(2); : xx=t(n)*cm :lprint using "####.##";xx;
- lprint tab(13); : xx=t(n)*inch : lprint using "####.##";xx;
- lprint tab(23);"D";str$(n); : if n<10 then lprint " ";
- lprint " --------#-------- ";
- xx=d(n)*cm : lprint using "####.##";xx;
- lprint tab(63); : xx=d(n)*inch : lprint using "####.##";xx
- next n
- goto AGAIN
-
- system
-
- L20040:
- dl(n)=(kl1-kl2*log(n))*(1-kl3*exp(-kl4*n))
- dh(n)=(kh1-kh2*log(n))*(1-kh3*exp(-kh4*n))
- d(n)=dl(n)+j*(dh(n)-dl(n))
- return
-
- data .001, .4711, .018, .08398, .965
- data .003, .462, .01941, .08543, .9697
- data .005, .4538, .02117, .0951, 1.007
- data .007, .4491, .02274, .08801, .9004
- data .01, .4421, .02396, .1027, 1.038
- data .015, .4358,.02558, .1149, 1.034
- data .02, .4268, .02614, .1112, 1.036
-
- DEF FNunits(wl)
- local wl
- shared p$, inch, cm
- if p$="1"tnFunits=wl*inch
- if p$="2" then FNunits=wl*cm
- END DEF
-
- SUB printunits
- shared p$
- if p$="1" then print " Inches";
- if p$="2" then print " Centimtres";
- if p$="3" then print " Wavelengths";
- END SUB
-
- SUB lprintunits
- shared p$
- if p$="1" then lprint " Inches"
- if p$="2" then lprint " Centimetres"
- if p$="3" then lprint " Wavelengths"
- END SUB
-
- SUB printat(row,col,s$,curs)
- local row,col,s$,curs
- locate row,col,curs
- print s$;
- END SUB
-
- SUB revideo(rev)
- local rev,junk
- if rev then
- junk=FNbconout%(2,27)
- junk=FNbconout%(2,asc("p"))
- else
- junk=FNbconout%(2,27)
- junk=FNbconout%(2,asc("q"))
- end if
- END SUB
-
- SUB clearit
- local junk
- locate 6,1,0
- junk=FNbconout%(2,27)
- junk=FNbconout%(2,asc("J"))
- END SUB
-
- SUB dickhead
- END SUB
-
-